package com.qzsoft.system.modules.sysstation.service.impl;

import java.io.Serializable;
import java.util.Collection;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qzsoft.system.modules.sysstation.entity.SysStationAsphaltMaterialDetailsEntity;
import com.qzsoft.system.modules.sysstation.mapper.SysStationAsphaltMaterialDetailsMapper;
import com.qzsoft.system.modules.sysstation.service.SysStationAsphaltMaterialDetailsService;

/**
 * @ClassName SysStationAsphaltMaterialDetailsServiceImpl
 * @Description 沥青物料设置详情业务接口实现
 * @author linhuawei
 * @since 2021-11-26
 */
@Service
public class SysStationAsphaltMaterialDetailsServiceImpl
        extends ServiceImpl<SysStationAsphaltMaterialDetailsMapper, SysStationAsphaltMaterialDetailsEntity>
        implements SysStationAsphaltMaterialDetailsService {

    @Override
    public void deleteByStationId(Serializable stationId) {
        QueryWrapper<SysStationAsphaltMaterialDetailsEntity> queryWrapper = new QueryWrapper<SysStationAsphaltMaterialDetailsEntity>();
        queryWrapper.eq("station_id", stationId);
        baseMapper.delete(queryWrapper);
    }

    @Override
    public void deleteByStationId(Collection<? extends Serializable> stationIdList) {
        QueryWrapper<SysStationAsphaltMaterialDetailsEntity> queryWrapper = new QueryWrapper<SysStationAsphaltMaterialDetailsEntity>();
        queryWrapper.in("station_id", stationIdList);
        baseMapper.delete(queryWrapper);
    }

}
